package com.easyweb.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.easyweb.dao.BaseDao;
import com.easyweb.dao.TagDao;
import com.easyweb.model.Tag;
@Repository
public class TagDaoImpl extends BaseDao implements TagDao{

	public int insertTag(Tag tag) {
		return getSqlSession().insert("tag.insertTag",tag);
	}

	public int deleteTagById(Map<String, Object> map) {
		return getSqlSession().delete("tag.deleteTagById", map);
	}

	public int updateTag(Tag tag) {
		return getSqlSession().update("tag.updateTagById", tag);
	}

	public List<Tag> getTags(Map<String, Object> map) {
		return getSqlSession().selectList("tag.selectTags", map);
	}

	public Tag getTagById(Map<String, Object> map) {
		return getSqlSession().selectOne("tag.selectTags", map);
	}

}
